<?php
$path='http://www.cqgmy.cn/xxgk/zxdt.htm';
function get_http_type($path)
{
    $http_type=substr($path,0,4);
    return $http_type;
}
$http_type=get_http_type($path);

function get_host_name($path)
{
    $host_name=substr($path,8,11);
    return $host_name;
}
$host_name=get_host_name($path);

function get_routine_name($path)
{
    $routine_name=substr($path,20);
    return $routine_name;
}
$routine_name=get_routine_name($path);

function get_mulu($path)
{
    $mulu=substr_count($path,'/')-2;
    return $mulu;
}
$mulu=get_mulu($path);

function getFileExt ($path)
{
    $ext=substr($path, strrpos($path,'.')+1);
    return $ext;
}
$ext=getFileExt ($path);
?>
<p>传输协议：<?php echo $http_type; ?></p>
<p>主机名：<?php echo $host_name; ?></p>
<p>页面程序名：<?php echo $routine_name; ?></p>
<p>目录结构：<?php echo $mulu."级"; ?></p>
<p>页面程序扩展名：<?php echo $ext; ?></p>
 
 


